package com.ck.demo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Accessors(chain = true)//链式编程
@AllArgsConstructor
@NoArgsConstructor
@Data
public class Emp {
    private Integer empno;//员工编号
    @NotEmpty //非空验证
    private String ename;//姓名
    private String sex;//性别
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;//生日
    @NotNull
    private Float salary;//薪水
    private String deptno;//部门编号
    private Date update_time;//修改时间
    private Integer estatus;//状态

    //扩展属性，
    private String dname;//部门名称

}
